package com.jpemartin.jgt;

import java.awt.Rectangle;

/** A MoveControl that moves in a straight line **/
public class MoveStraight implements MoveControl {


    protected int _dx;
    protected int _dy;

    /** the two arguments are the horizontal and vertical distance traveled
     *  each step.
     */
    public MoveStraight(int dx, int dy) {
        _dx = dx;
        _dy = dy;
    }
    
    
    public void move(Rectangle me) {
        me.x += _dx;
        me.y += _dy;
    }
    
}
